﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.ComponentModel;
using Iridescent.Models;
using System.Linq;


namespace Iridescent.ViewModels
{
    public class TimetableViewModel : INotifyPropertyChanged
    {

        public TimetableViewModel()
        {
            CourseListViewModels =
                (from day in Enumerable.Range(0, 7).Cast<DayOfWeek>()
                 select new CourseListViewModel(day)).ToList();
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void RaisePropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
       
        private int selectedCourseListIndex;

        public int SelectedCourseListIndex
        {
            get { return selectedCourseListIndex; }
            set
            {
                if (selectedCourseListIndex != value)
                {
                    selectedCourseListIndex = value;
                    RaisePropertyChanged("SelectedCourseListIndex");
                }
            }
        }

        public List<CourseListViewModel> CourseListViewModels { get; private set; }
    }
}
